<template>
	<view class="acc-content">
		<u-toast ref="uToast"></u-toast>
		<view class="acc-wrap">
			<u-gap height="16" bgColor="#f7f6fa"></u-gap>
			<u-cell-group :border="false">
				<u-cell :border="false" :disabled="true" isLink title="个人信息" rightIconStyle="color: #bcbfcc"
					url="/pages/member/modify/modifyPassword">
				</u-cell>
				<u-gap height="16" bgColor="#f7f6fa"></u-gap>
				<u-cell :border="false" :disabled="true" isLink title="密码修改" rightIconStyle="color: #bcbfcc"
					url="/pages/member/modify/modifyPassword">
				</u-cell>
				<u-gap height="16" bgColor="#f7f6fa"></u-gap>
				<u-cell :border="false" :disabled="true" isLink title="公众号通知提醒" rightIconStyle="color: #bcbfcc"
					@click="weChat()">
				</u-cell>
				<u-gap height="16" bgColor="#f7f6fa"></u-gap>
			</u-cell-group>
			<u-button hairline @click="loginOut()">退出账号</u-button>
			<u-modal :content="content" :show="this.weChatShow" @confirm="() => weChatShow = false">
			</u-modal>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				weChatShow: false,
				content: '无法开启，请登录PC网站后台在账号设置 - 通知设置中进行开启'
			}
		},
		methods: {
			weChat() {
				this.weChatShow = true;
			},
			loginOut() {
				try {
					uni.clearStorageSync();
					uni.redirectTo({
						url: "/pages/login/landPage"
					});
					return this.$refs.uToast.show({
						message: "已退出登录",
						type: 'default',
					})
				} catch (e) {
					return this.$refs.uToast.show({
						message: "清除失败",
						type: 'error',
					})
				}
			}
		}
	}
</script>

<style lang="scss" scoped>
	.acc-wrap {
		width: 100%;
		background-color: #fff;
	}

	.acc-wrap /deep/ .u-button {
		font-size: 30rpx;
		color: #FD7840;
		height: 100rpx;
	}

	.acc-wrap /deep/ .u-cell__body {
		padding: 28rpx 30rpx;
	}
</style>